<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of taikhoan
 *
 * @author sonUIT
 */
class Taikhoan extends CI_Controller {

    //put your code here
    public function __construct() {
        parent::__construct();
    }

    function index() {
        
    }

    function dangnhap() {
        $email = $this->input->post('email_login');
        $pass = $this->input->post('pass_login');
        $this->load->model("mtaikhoan");
        $tk = new Mtaikhoan();
        //  var_dump($email.$pass);
        if ($tk->dangnhap($email, $pass))
            header("location:" . base_url("index.php/homepage"));
        else {
            echo 'ten tai khoan hoac mat khau khong dung';
        }
    }

    function thoat() {
        $this->session->unset_userdata("is_login");
        header("location:" . base_url("index.php/homepage"));
    }

}

?>
